
package com.insigma.business.qrcode.soldier.dao;


import com.insigma.business.qrcode.common.annotation.Crypt;
import com.insigma.business.qrcode.soldier.dto.SoldierBasicInfoBSearcher;
import com.insigma.business.qrcode.soldier.dto.SoldierTpAllBSearcher;
import com.insigma.business.qrcode.soldier.entity.DataStatsCDO;
import com.insigma.business.qrcode.soldier.entity.SoldierTpAllDO;
import com.insigma.business.qrcode.soldier.dto.SoldierTpAllDetailBO;
import com.insigma.business.qrcode.soldier.entity.SoldierBasicInfoDO;

import org.apache.ibatis.annotations.Param;

import java.util.List;


@Crypt(decryptFields = {"idCardNo", "", ""})
public interface SoldierTpAllDao {

    
    List<SoldierTpAllDO> search(final SoldierTpAllBSearcher innerSearcher);

    
    SoldierTpAllDO get(final String id);

    
    Integer insert(final SoldierTpAllDO soldierTpAllDO);

    
    Integer update(final SoldierTpAllDO soldierTpAllDO);

    
    Integer delete(@Param("id") final String id,
                   @Param("modifierType") final String modifierType,
                   @Param("modifierId") final String modifierId);

    @Crypt(encryptParamIndex = {0})
    SoldierTpAllDO getByIdCardNo(String idCardNo);

    List<SoldierTpAllDO> get3Ydate();

    @Crypt(encryptParamIndex = {0})
    void update3YTest(@Param("idCardNo")String idCardNo, @Param("p")String result);

    List<SoldierTpAllDO> listAllShare(String areaLike);

    Integer countUnemploymentRegistration(String areaLike);

    List<DataStatsCDO> countUnemploymentRegistrationAreaMap(@Param("areaLike") String areaLike, @Param("nextLevel") int nextLevel,
                                                            @Param("levelLength") int levelLength, @Param("startCalDateTime")String startCalDateTime);

    List<SoldierTpAllDO> listAllJobTaxCompany(String areaLike);

    List<SoldierBasicInfoDO> queryAllTest();

    List<SoldierTpAllDO> listAllShareOfTax(String areaLike);

    List<SoldierTpAllDO> get3YdateOfSocialMore(String year);

    List<SoldierTpAllDO> listAllUnemploymentRegistration(String areaLike);

    @Crypt(encryptParamIndex = {0})
    int updateUnemploymentRegistrationTime(@Param("idCardNo")String idCardNo, @Param("time")String time);

    List<DataStatsCDO> countYear3UnemploymentRegistrationAreaMap(@Param("areaLike") String areaLike, @Param("nextLevel") int nextLevel,
                                                                 @Param("levelLength") int levelLength, @Param("startCalDateTime")String startCalDateTime);

    int countYear3UnemploymentRegistration(@Param("adminAreaCode")String adminAreaCode, @Param("currentYearStartTime")String currentYearStartTime);

    List<DataStatsCDO> countYear3UnemploymentRegistrationAgeMap(@Param("areaLike")String areaLike, @Param("startCalDateTime")String startCalDateTime);

    List<SoldierTpAllDO> getAllNotRetired(@Param("startYear")String startYear, @Param("endYear")String endYear);

    int countShareholder(@Param("startYear")String startYear, @Param("endYear")String endYear);

    SoldierTpAllDO isMilitaryEnterprise(String uniscid);

    List<SoldierTpAllDO> listNotRetiredSocialSecurity(@Param("areaCode")String areaCode, @Param("flag")Boolean flag);

    @Crypt(returnDecrypt = true)
    List<String> listIdCardNoOfLowSide();
    @Crypt(returnDecrypt = true)
    List<String> listIdCardNoOfSubsistenceAllowance();
    @Crypt(returnDecrypt = true)
    List<String> listIdCardNoOfExtremelyPoor();

    List<SoldierTpAllDO> searchAllSocialSecurity(SoldierBasicInfoBSearcher searcher);

    @Crypt(encryptParamIndex = {0})
    Integer updateLatestSocialTime(@Param("idCardNo")String idCardNo, @Param("time")String time);

    List<SoldierTpAllDO> searchItem(SoldierBasicInfoBSearcher searcher);

    Integer countNoSocialSecurityNum(String areaLike);

    Integer countEmploymentNum(@Param("areaLike")String areaLike, @Param("startCalDateTime")String startCalDateTime);

    Integer countWithdrawNum(@Param("areaLike")String areaLike, @Param("startCalDateTime")String startCalDateTime);

    List<DataStatsCDO> listDifficultyAgeRange(String areaLike);

    Integer countDifficulty(String areaLike);

    List<DataStatsCDO> queryDifficultyAreaCount(@Param("areaLike")String areaLike, @Param("nextLevel")int nextLevel, @Param("levelLength")int levelLength);

    List<SoldierTpAllDO> searchSocialSecurityInfo(SoldierTpAllBSearcher searcher);

    List<SoldierTpAllDetailBO> searchShareholder(SoldierTpAllBSearcher searcher);

    List<SoldierTpAllDO> searchUnemploymentRegistration(SoldierTpAllBSearcher innerSearcher);

    @Crypt(encryptParamIndex = {0})
    List<SoldierTpAllDO> listSocialSecurityByIdCardNoList(@Param("idCardNoList")List<String> idCardNoList);


    Integer countLowSide(String adminAreaCode);

    Integer countSubsistenceAllowance(String adminAreaCode);

    Integer countExtremelyPoor(String adminAreaCode);

    List<SoldierTpAllDO> listAllIdCardNoInTestTable();


    List<SoldierTpAllDO> listAllShareOfAllCompany(String areaLike);

    Integer countCommunityCorrection(String adminAreaCode);

    List<SoldierTpAllDO> searchNotRetiredSocialSecurity(SoldierTpAllBSearcher searcher);

    @Crypt(returnDecrypt = true)
    List<String> searchIdCardNo(SoldierTpAllBSearcher searcher);
}
